#include "textbox.h"
#include "textbox_win32.h"
#include "widget_helper_win32.h"

using namespace krryn::system_imp;
using namespace krryn::gui;

void textbox_impl_win32::make(const textbox_initializer &a_Initializer){
	widget_helper_win32::load_common_controls();

	HWND l_ParentWnd = (HWND)a_Initializer.get_parent()->handle();

	widget_hook_win32(this);

	m_hWnd = CreateWindow(
		TEXT("EDIT"), 
		NULL, 
		WS_TABSTOP | widget_helper_win32::visible(a_Initializer) | WS_CHILD | WS_BORDER | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL, 
		a_Initializer.get_left(), a_Initializer.get_top(), 
		a_Initializer.get_width(), a_Initializer.get_height(), 
		l_ParentWnd, 0, 0, 0);

	widget_helper_win32::fix_font(m_hWnd);
}